<?php 
include_once('connection/connection.php');
include('config.php');
//session_start();
//ob_start();
include('header.php');
include('menu.php');
?>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<link href="css/style_question.css" type="text/css" rel="stylesheet" />
<script language="javascript" type="text/javascript" src="js/validate.js"></script>
<script language="Javascript" type="text/javascript" src="js/ajaxFunction_crit.js"></script>
<script language="Javascript" type="text/javascript" src="js/ajaxFunction1_q1.js"></script>
<script language="javascript">
function mult()
{
	var value1=document.getElementById('popul_benefited').value;
	var value2=Math.round(value1 * 1.29);
	//var value2=Math.round(value1 * 1.4);
	document.getElementById('present_popul').value=value2;	
}
function mult2()
{
	var value1=document.getElementById('factor1').value;
	var value2=document.getElementById('population_benefited1').value;
	var value3=Math.round(value1 * value2);
	document.getElementById('present_population1').value=value3;
	alert('Value of Population Benefited Field is '+ value2 +', Present Population is '+ value3 +' and Population Factor is ' + value1);	
}
function showMe(box,id) 
{
 	var elm = document.getElementById(id);
	if(box.checked)
	{
 		//elm.style.display = box.checked? "inline":"none";
		elm.style.display = "block";
		if(box.value=='4kl')
		{
			
			document.getElementById('kl4_cap').value="4";
			//document.getElementById('kl4_cap').readonly=true;
		}
		if(box.value=='5kl')
		{
			document.getElementById('kl5_cap').value="5";
			//document.getElementById('kl5_cap').readonly=true;
		}
		if(box.value=='10kl')
		{
			document.getElementById('kl10_cap').value="10";
			//document.getElementById('kl10_cap').readonly=true;
		}
	}
	else
	{
		elm.style.display = "none";
		if(box.value=='4kl')
		{
		document.getElementById('kl4_cap').value="";
		//document.getElementById('kl4_cap').disabled=true;
		document.getElementById('kl4_trips').value="";
		document.getElementById('kl4_supply').value="";
		var a=document.getElementsByName('kl4_sources[]')
		a[0].checked=false;
		a[1].checked=false;
		a[2].checked=false;
		document.getElementById('kl4_source_other').value="";
		document.getElementById('kl4_source_other').disabled=true;
		document.getElementById('kl4_tanker_distance').value="";
		document.getElementById('kl4_tanker_cost').value="";
		}
		if(box.value=='5kl')
		{
		document.getElementById('kl5_cap').value="";
		//document.getElementById('kl5_cap').disabled=true;
		document.getElementById('kl5_trips').value="";
		document.getElementById('kl5_supply').value="";
		var a=document.getElementsByName('kl5_sources[]')
		a[0].checked=false;
		a[1].checked=false;
		a[2].checked=false;
		document.getElementById('kl5_source_other').value="";
		document.getElementById('kl5_source_other').disabled=true;
		document.getElementById('kl5_tanker_distance').value="";
		document.getElementById('kl5_tanker_cost').value="";
		}
		if(box.value=='10kl')
		{
		document.getElementById('kl10_cap').value="";
		//document.getElementById('kl10_cap').disabled=true;
		document.getElementById('kl10_trips').value="";
		document.getElementById('kl10_supply').value="";
		var a=document.getElementsByName('kl10_sources[]')
		a[0].checked=false;
		a[1].checked=false;
		a[2].checked=false;
		document.getElementById('kl10_source_other').value="";
		document.getElementById('kl10_source_other').disabled=true;
		document.getElementById('kl10_tanker_distance').value="";
		document.getElementById('kl10_tanker_cost').value="";
		}
		if(box.value=='other')
		{
		document.getElementById('other_cap').value="";
		document.getElementById('other_trips').value="";
		document.getElementById('other_supply').value="";
		var a=document.getElementsByName('other_sources[]')
		a[0].checked=false;
		a[1].checked=false;
		a[2].checked=false;
		document.getElementById('text_source_other').value="";
		document.getElementById('text_source_other').disabled=true;
		document.getElementById('other_tanker_distance').value="";
		document.getElementById('other_tanker_cost').value="";
		}
	}
}
</script>
<title>Critical Form</title>
</head>
<body onLoad="CritDisable(false)">
<?php
date_default_timezone_set('Asia/Kolkata');
$stamp = time();
$getdate = getdate($stamp);
	////////////////////////////////////////// function for dob starts //////////////
function dpulldown($name,$d,$m,$y)//This function will provide the pulldown for date
{
	$stamp = time();
	$getdate = getdate($stamp);
	$months = array(1 => 'January','February','March','April','May','June','July','August','September','October','November','December');
	echo'<select name="'.$name.'date" class="date">';
	for($date = 1; $date <= 31; $date++)
	{
		echo'<option value="'.$date.'" ';if($d == $date) echo'selected="selected"'; echo'>'.$date.'</option>';
	}
	echo'</select>';
	echo'<select name="'.$name.'month" class="date">';
	foreach($months as $key => $value)
	{
		echo'<option value="'.$key.'" ';if($m == $key) echo'selected="selected"'; echo'>'.$value.'</option>';
	}
	echo'</select>';
	echo'<select name="'.$name.'year" class="date">';
	for($year = 2005; $year <= ($getdate['year']); $year++)
	{
		echo'<option value="'.$year.'" ';if($y == $year) echo'selected="selected"'; echo'>'.$year.'</option>';
	}
	echo'</select>';
}
if(isset($_POST['submit']))
{
		$fclick = true;
		$dob = $_POST['dobyear'].'-'.$_POST['dobmonth'].'-'.$_POST['dobdate'];
		$id=$_POST['id'];
		$form_id=$_POST['form_id'];
		$_SESSION['form_id']=$form_id;
		$district=$_POST['district'];
		$block=$_POST['block'];
		$tehsil=$_POST['tehsil'];
		$panchayat=$_POST['panchayat'];
		$village=$_POST['village'];
		$cvc=$_POST['cvc'];
		$population_benefited1=$_POST['population_benefited1'];
		$present_population1=$_POST['present_population1'];
		if($_POST['type_scheme']!='Other')
		{
			$type_scheme=$_POST['type_scheme'];	
		}
		else
		{	
			$type_scheme=$_POST['type_scheme_other'];
		}
		$scheme_status=$_POST['scheme_status'];
		$water_demand=$_POST['water_demand'];
		$sources=$_POST['sources'];
		$source_other=$_POST['source_other'];
		$sources=implode(',',$sources); 
		$sources=$sources . $source_other;
		$power_supply=$_POST['power_supply'];
		$kl4_cap=$_POST['kl4_cap'];
		$kl4_trips=$_POST['kl4_trips'];
		$kl4_supply=$_POST['kl4_supply'];
		$kl4_sources=$_POST['kl4_sources'];
		$kl4_source_other=$_POST['kl4_source_other'];
		$kl4_sources=implode(',',$kl4_sources); 
		$kl4_sources=$kl4_sources . $kl4_source_other;
		$kl4_tanker_distance=$_POST['kl4_tanker_distance'];
		$kl4_tanker_cost=$_POST['kl4_tanker_cost'];
		$kl5_cap=$_POST['kl5_cap'];
		$kl5_trips=$_POST['kl5_trips'];
		$kl5_supply=$_POST['kl5_supply'];
		$kl5_sources=$_POST['kl5_sources'];
		$kl5_source_other=$_POST['kl5_source_other'];
		$kl5_sources=implode(',',$kl5_sources); 
		$kl5_sources=$kl5_sources . $kl5_source_other;
		$kl5_tanker_distance=$_POST['kl5_tanker_distance'];
		$kl5_tanker_cost=$_POST['kl5_tanker_cost'];
		$kl10_cap=$_POST['kl10_cap'];
		$kl10_trips=$_POST['kl10_trips'];
		$kl10_supply=$_POST['kl10_supply'];
		$kl10_sources=$_POST['kl10_sources'];
		$kl10_source_other=$_POST['kl10_source_other'];
		$kl10_sources=implode(',',$kl10_sources); 
		$kl10_sources=$kl10_sources . $kl10_source_other;
		$kl10_tanker_distance=$_POST['kl10_tanker_distance'];
		$kl10_tanker_cost=$_POST['kl10_tanker_cost'];
		$other_cap=$_POST['other_cap'];
		$other_trips=$_POST['other_trips'];
		$other_supply=$_POST['other_supply'];
		$other_sources=$_POST['other_sources'];
		$text_source_other=$_POST['text_source_other'];
		$other_sources=implode(',',$other_sources); 
		$other_sources=$other_sources . $text_source_other;
		$other_tanker_distance=$_POST['other_tanker_distance'];
		$other_tanker_cost=$_POST['other_tanker_cost'];
		
		echo $q1="INSERT INTO tbl_dtls_critical(id, form_id, district_id, date, block_id, tehsil_id, panchayat_id, village_id, cvc, population_01, population_current, scheme_type, scheme_status, water_demand, agri_source, agri_power, cap_4, trip_4, supply_4, source_4, distance_4, cost_4, cap_5, trip_5, supply_5, source_5, distance_5, cost_5, cap_10, trip_10, supply_10, source_10, distance_10, cost_10, other_cap, other_trip, other_supply, other_source, other_distance, other_cost, post_date) VALUES ('$id', '$form_id', '$district', '$dob', '$block', '$tehsil', '$panchayat', '$village', '$cvc', '$population_benefited1', '$present_population1', '$type_scheme', '$scheme_status', '$water_demand', '$sources', '$power_supply', '$kl4_cap', '$kl4_trips', '$kl4_supply', '$kl4_sources', '$kl4_tanker_distance', '$kl4_tanker_cost', '$kl5_cap', '$kl5_trips', '$kl5_supply', '$kl5_sources', '$kl5_tanker_distance', '$kl5_tanker_cost', '$kl10_cap', '$kl10_trips', '$kl10_supply', '$kl10_sources', '$kl10_tanker_distance', '$kl10_tanker_cost', '$other_cap', '$other_trips', '$other_supply', '$other_sources', '$other_tanker_distance', '$other_tanker_cost', NOW())"; 
		$r1=mysql_query($q1);
			if($r1)
			{
				//header('Location: critical_form2.php');
				$relocatePage=true;
				//echo "success 1";		
			}
			else 
			{
				$errorIns="Error inserting critical table <br>";
			}
			$q2="SELECT DISTINCT habitation_code, habitation_name from tbl_lookup_location where census_village_code='$cvc' order by habitation_code";
			$r2=mysql_query($q2);
			$num_rows = mysql_num_rows($r2);
			$q3="SELECT id FROM tbl_dtls_critical where form_id='$form_id'";
			$r3=mysql_query($q3);
			$x=mysql_fetch_array($r3);
			$loc_id=$x['id'];
			$_SESSION['loc_id']=$loc_id;
			for($i=1; $i<=$num_rows; $i++)
			{
				$hname = 'name_habi'.$i;
				$hcode = 'habi_code'.$i;
				$type_habit='type_habit'.$i;
				$household = 'household'.$i;
				$status_a_na = 'status_a_na'.$i;
				$sc = 'population_sc'.$i;
				$st = 'population_st'.$i;
				$other = 'population_other'.$i;
				$total = 'population_total'.$i;
				$hname=$_POST[$hname];	
				$hcode=$_POST[$hcode];
				$type_habit=$_POST[$type_habit];
				$household=$_POST[$household];
				$status_a_na=$_POST[$status_a_na];
				$sc=$_POST[$sc];
				$st=$_POST[$st];
				$other=$_POST[$other];
				$total=$_POST[$total];
				
				echo $q4="INSERT INTO tbl_dtls_critical_habit(loc_id, habit_name, habit_code, type_habit, num_household_oh, status_a_na, population_sc, population_st, population_other, population_total) VALUES ('$loc_id', '$hname', '$hcode', '$type_habit', '$household', '$status_a_na', '$sc', '$st', '$other', '$total')";
				$r4=mysql_query($q4);	
			}	
			if($r4)
			{
				$relocatePage=true;
				//echo "success 2";
			}
			else 
			{
				$errorIns.="Error inserting habit table <br>";
			}
			
			$num_unhabit_crit=$_POST['num_unhabit_crit'];
			for($i=1; $i<=$num_unhabit_crit; $i++)
			{
				$un_habit_crit='un_habit_crit'.$i;
				$un_habit_crit=$_POST[$un_habit_crit];
				$q5="INSERT INTO tbl_dtls_critical_unhabit(loc_id, unhabit_name) VALUES ('$loc_id', '$un_habit_crit')";
				$r5=mysql_query($q5);	
			}	
			if($r5)
			{
				$relocatePage=true;
			}
			else 
			{
				$errorIns.="Error inserting un_habit table <br>";
			}
			if($errorIns==0) 
			{
				header('Location: critical_form2.php');
			}
			else 
			{ 
				echo $errorIns;exit;
			}
}
else
{
	$fclick = false;
	$flag=0;
}
?>
<div align="center">
<!--<form action="" method="post" enctype="multipart/form-data" name="critical_form1" id="critical_form1" onSubmit="mult2()">-->
<form action="" method="post" enctype="multipart/form-data" name="critical_form1" id="critical_form1" onSubmit="return critical();">
	<table border="0" width="800" id="table1" cellspacing="0" cellpadding="0">
		<tr>
			<td height="30" colspan="2">
			<p align="center">
			<font face="Verdana" style="font-size: 10pt; font-weight: 700" color="#000000">
			Critical Village Form</font></td>
		</tr>
		<tr>
			<td colspan="2" align="center"><font face="Arial" style="font-size: 8.5pt" color="#000000">Page 1</font></td>
		</tr>
		<tr>
			<td height="19" colspan="2" align="center"><font face="Arial" style="font-size: 8.5pt" color="#000000">(This Web Application is More Compatible with Mozilla Firefox and Google Chrome)</font></td>
		</tr>
		<tr>
			<td colspan="2">&nbsp;</td>
		</tr>
		<tr>
			<td height="22" colspan="2" bgcolor="#EEEEEE"><font color="#000000">&nbsp;
			<font style="font-size: 8.5pt; font-weight: 700" face="Arial">
			Main Location </font></font></td>
		</tr>
		<tr>
			<td colspan="2">
				<table border="0" width="800" id="table2" bgcolor="#FDF9EE" cellspacing="1" cellpadding="0">
					<tr>
						<td colspan="4">
							<span style="font-size: 4pt">&nbsp;</span></td>
					</tr>
					<tr>
						<td width="157">
							<font face="Verdana" style="font-size: 8.5pt" color="#000000"><font color="#FF0000">&nbsp;&nbsp;*</font>District</font>						</td>
						<td width="270"><font id=district>
							<select name="district" id="district" class="txt">
								<option value="">Select District</option>
        					</select></font><span id="districtLoader"></span>
							<font id="factor"><input type="hidden" size="20" class="txt5"></font></td>
						<td width="111">
							<font face="Verdana" style="font-size: 8.5pt" color="#000000"><font color="#FF0000">*</font>Date&nbsp;&nbsp;</font>						</td>
            			<td width="207">
						 <?php dpulldown('dob',$getdate['mday'],$getdate['mon'],$getdate['year']);?></td>
					</tr>
					<tr>
						<td width="157">
							<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp;
							<font color="#FF0000">*</font>Block </font></td>
						<td width="270"><font id=block>
							<select name="block" class="txt">
								<option value="">==============</option>
							</select></font><span id="blockLoader"></span></td>
						<td width="111">
							<font face="Verdana" style="font-size: 8.5pt" color="#000000"><font color="#FF0000">*</font>Revenue &nbsp;&nbsp;Tehsil&nbsp;&nbsp;&nbsp;</font>						</td>
						<td width="207"><font id=tehsil>
							<select name="tehsil" class="txt">
								<option value="">==============</option>
							</select></font><span id="tehsilLoader"></span></td>
			    	</tr>
				</table></td>
		</tr>
		<tr>
			<td colspan="2"><span style="font-size: 4pt">&nbsp;</span></td>
		</tr>
		<tr>
		<td height="22" colspan="2" bgcolor="#EEEEEE"><font color="#000000">&nbsp;
			<font style="font-size: 8.5pt; font-weight: 700" face="Arial">
			1. Location </font></font></td>
	</tr>
	<tr>
		<td colspan="2">
			<table border="0" width="800" id="table7" bgcolor="#FDF9EE" cellspacing="1" cellpadding="0">
				<tr>
					<td height="11" colspan="4">
						<span style="font-size: 4pt">&nbsp;</span></td>
				</tr>
				<tr>
					<td width="285" height="29">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp; <font color="#FF0000">*</font>Grampanchayat</font>					</td>
					<td width="512"><font id=panchayat>
						<select name="panchayat" class="txt">
						<option value="">==============</option>
						</select></font><span id="panchayatLoader"></span></td>
				</tr>
				<tr>
					<td width="285" height="28">&nbsp;
						<font style="font-size: 8.5pt" face="Verdana" color="#000000"><font color="#FF0000">*</font>Village Covered Name</font>					</td>
					<td width="512"><font id=village>
						<select name="village" class="txt">
						<option value="">==============</option>
						</select></font><span id="villageLoader"></span></td>
				</tr>
				<tr>
					<td width="285" height="29">&nbsp;
						<font style="font-size: 8.5pt" face="Verdana" color="#000000"><font color="#FF0000">*</font>Form Id</font></td>
					<td width="512"><div id="form_id">
						<input type="text" size="23" class="txt" value="" readonly></div></td>
				</tr>
				<tr>
					<td width="285" height="28">&nbsp;
						<font style="font-size: 8.5pt" face="Verdana" color="#000000"><font color="#FF0000">*</font>Census Village Code</font></td>
					<td width="512"><font id=cvc>
						<input type="text" size="23" class="txt" value="" readonly>	
						</font></td>
				</tr>
				<tr>
			<td colspan="2"><span style="font-size: 4pt">&nbsp;</span></td>
		</tr>
				<tr>
					<td colspan="4" bgcolor="#EEEEEE">&nbsp;
					<font style="font-size: 8.5pt; font-weight: 700" face="Arial" color="#000000">
					2. Other Habitations (OH) covered</font></td>
				</tr>
			</table></td>
	</tr>
	<tr>
			<td colspan="2">
			<table border="0" width="800" id="table4" cellspacing="1" cellpadding="0" bgcolor="#FDF9EE">
				<tr>
					<td colspan="9"><span style="font-size: 4pt">&nbsp;</span></td>
				</tr>
				<tr>
					<td width="22%" align="center" rowspan="2" bgcolor="#F7E6B7">
					<font style="font-size: 8.5pt" face="Verdana" color="#990000">
					Name of the Habitation</font></td>
					<td align="center" width="10%" rowspan="2" bgcolor="#F7E6B7">
					<address>
						<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">
						Code No. </font>
					</address>
					<address>
					<font face="Verdana" color="#990000" style="font-size: 8.5pt; font-style: normal">
						(Census Village/ IMIS)</font>
				  </address></td>
					<td align="center" width="7%" rowspan="2" bgcolor="#F7E6B7">
					<address>
						<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">
				  Type MH/ OH</font>
				  </address></td>
					<td align="center" width="9%" rowspan="2" bgcolor="#F7E6B7">
					<address><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Status</font></address>
				  <address>
				  <font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">(A/ NA)</font>
				  </address></td>
				  <td align="center" width="11%" rowspan="2" bgcolor="#F7E6B7">
						<font style="font-size: 8.5pt" face="Verdana" color="#990000">
						Approx No. of Household(No.)</font></td>
					<td align="center" height="22" colspan="4" bgcolor="#F7E6B7">
						<font style="font-size: 8.5pt" face="Verdana" color="#990000">Current Population(2010)</font></td>
				</tr>
				<tr>
					<td width="10%" align="center" bgcolor="#F7E6B7">
						<font style="font-size: 8.5pt" face="Verdana" color="#990000">SC</font></td>
					<td width="10%" align="center" bgcolor="#F7E6B7">
						<font style="font-size: 8.5pt" face="Verdana" color="#990000">ST</font></td>
					<td width="10%" align="center" bgcolor="#F7E6B7">
						<font style="font-size: 8.5pt" face="Verdana" color="#990000">Others</font></td>
					<td width="11%" align="center" bgcolor="#F7E6B7">
						<font style="font-size: 8.5pt" face="Verdana" color="#990000">Total</font></td>
				</tr>
				<tr>
			<td colspan="9"><span style="font-size: 3pt">&nbsp;</span></td>
		</tr>
			</table></td></tr>
	<tr>
		<td colspan="2"><div id="habit"></div></td>
	</tr>
	<tr><td colspan="10">&nbsp;</td></tr>
		<tr>
			<td width="173" height="22" bgcolor="#EEEEEE">&nbsp;
			<font style="font-size: 8.5pt; font-weight: 700" face="Arial" color="#000000">No. of Unlisted Habitation</font></td>
		    <td width="627" bgcolor="#EEEEEE"><input type="text" name="num_unhabit_crit" id="num_unhabit_crit" value="" class="txt5" onKeyUp="showunhabit_crit();numeric(this)"></td>
		</tr>
		<tr><td colspan="3">&nbsp;</td></tr>
		<tr>
			<td colspan="3"><div id="show_unhabit_crit"></div></td>
		</tr>
		<tr><td colspan="5">&nbsp;</td></tr>
		
		<tr>
			<td colspan="2"><span style="font-size: 3pt">&nbsp;</span></td>
		</tr>
		<tr>
		<td colspan="2" bgcolor="#EEEEEE">&nbsp;
			<span style="font-weight: 700">
			<font face="Arial" style="font-size: 8.5pt" color="#000000">3. Population</font></span></td>
	</tr>
	<tr>
		<td colspan="2">
			<table border="0" width="800" id="table8" bgcolor="#FDF9EE" cellspacing="1" cellpadding="0">
				<tr>
				
					<td width="222" height="25">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp; 
						Population 2001 census</font></td>
					<td width="152">
					<div id="population_benefited">
				    <input type="text" class="txt5" onBlur="" size="20" readonly>
				  	</div>
				  <!--<input type="text" name="popul_benefited" id="popul_benefited" size="20" class="txt5" onBlur="mult();numeric(this)">-->				  </td>
					<td width="160">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">
						Present Population(2010)</font></td>
				  <td width="261">
				  <div id="present_population">
					<input type="text" size="20" class="txt5" readonly>
					</div>
				  </td>
				</tr>
			</table></td></tr>
			<tr>
		<td colspan="2">
			<span style="font-size: 5pt">&nbsp;</span></td>
	</tr>	
	<tr>
			<td colspan="2"><span style="font-size: 3pt">&nbsp;</span></td>
		</tr>
		<tr>
			<td height="22" colspan="2" bgcolor="#EEEEEE"><font color="#000000">&nbsp;
				</font><span style="font-weight: 700">
				<font face="Arial" style="font-size: 8.5pt" color="#000000">&nbsp;4. Scheme 
				Detail</font></span></td>
		</tr>
		<tr>
			<td colspan="2">
			<table width="800" height="93" border="0" cellpadding="0" cellspacing="1" bgcolor="#FDF9EE" id="table6">
				<tr>
					<td width="270" height="32">&nbsp;
						<font style="font-size: 8.5pt" face="Verdana" color="#000000">
						Type of the Scheme (As of Now)</font></td>
					<td width="477">
						<font style="font-size: 8.5pt" face="Verdana" color="#000000">
						<input type="radio" name="type_scheme" id="type_scheme"value="HP" onClick="CritEnabScheme(false)">HP&nbsp;&nbsp;&nbsp;
						<input type="radio" name="type_scheme" id="type_scheme"value="P&T" onClick="CritEnabScheme(false)">P&amp;T&nbsp;&nbsp;&nbsp;
						<input type="radio" name="type_scheme" id="type_scheme" value="Piped" onClick="CritEnabScheme(false)">Piped&nbsp;&nbsp;&nbsp;
						<input type="radio" name="type_scheme" id="type_scheme" value="Regional" onClick="CritEnabScheme(false)">Regional&nbsp;&nbsp;&nbsp;
						<input type="radio" name="type_scheme" id="type_scheme" value="Other" onClick="CritEnabScheme(true)">Other&nbsp;
						<input type="text" name="type_scheme_other" id="type_scheme_other" size="20" class="txt5">
						</font></td>
				</tr>
				<tr><td colspan="2"><hr color="#FFFFFF" size="4"></td></tr>
				<tr>
					<td width="270" height="24">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp; 
						Status</font></td>
					<td width="477">
						<font style="font-size: 8.5pt" face="Verdana" color="#000000">
						<input type="radio" name="scheme_status" id="scheme_status"value="F" checked="checked">Functional&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<input type="radio" name="scheme_status" id="scheme_status"value="NF">Non Functional</font></td>
				</tr>
				<tr><td colspan="2"><hr color="#EEEEEE" size="4"></td></tr>
				<tr>
					<td height="23" colspan=""><font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp; Present Water Demand(KLD)</font></td>
				    <td height="23"><input type="text" size="23" class="txt" value="" name="water_demand" id="water_demand" onBlur="float2dec(this)"></td>
				</tr>
			</table></td></tr>
			<tr><td height="6" colspan="2"><span style="font-size: 5pt">&nbsp;</span></td></tr>
			<tr><td colspan="2"><span style="font-size: 3pt">&nbsp;</span></td></tr>
	<tr>
			<td height="22" colspan="2" bgcolor="#EEEEEE"><font color="#000000">&nbsp;
				</font><span style="font-weight: 700">
				<font face="Arial" style="font-size: 8.5pt" color="#000000">&nbsp;5. Sources of Water for Agriculture Purposes</font></span></td>
		</tr>
		<tr>
			<td colspan="2">
			<table width="800" height="63" border="0" cellpadding="0" cellspacing="1" bgcolor="#FDF9EE" id="table6">
				<tr>
					<td width="270" height="29">&nbsp;
						<font style="font-size: 8.5pt" face="Verdana" color="#000000">
						Type of Sources</font></td>
					<td width="477">
						<font style="font-size: 9pt" face="Arial" color="#000000">
					<input type="checkbox" name="sources[]" id="sources[]" value="tw">TW&nbsp;
					<input type="checkbox" name="sources[]" id="sources[]" value="hp">HP&nbsp;
				  <input type="checkbox" name="sources[]" id="sources[]" value="ow">OW&nbsp;
				  <input type="checkbox" name="sources[]" id="sources[]" value="Other" onClick="CritEnabSource(this.checked)">Other&nbsp;</font>
				  <input type="text" name="source_other" id="source_other" class="txt"></td>
				</tr>
				
				<tr>
					<td width="270" height="24">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp; Power Availability of Power Supply(hrs)</font></td>
					<td width="477">
						<input type="text" size="23" class="txt" value="" name="power_supply" id="power_supply" onBlur="float2dec(this)"></td>
				</tr>
			</table></td></tr>
			<tr><td height="6" colspan="2"><span style="font-size: 5pt">&nbsp;</span></td></tr>
			<tr><td colspan="2"><span style="font-size: 3pt">&nbsp;</span></td></tr>
	<tr>
			<td height="22" colspan="2" bgcolor="#EEEEEE"><font color="#000000">&nbsp;
				</font><span style="font-weight: 700">
				<font face="Arial" style="font-size: 8.5pt" color="#000000">&nbsp; 6. Tanker Detail</font></span></td>
		</tr>
	<tr>
		<td colspan="7">
			<table border="0" width="800" id="table10" bgcolor="#FDF9EE" cellspacing="1" cellpadding="0">
				<tr>
					<td width="288" height="22" bgcolor="#F7E6B7" colspan="4">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp;Type of Tanker / Capacity</font></td>
				</tr>
				<tr><td width="288" colspan="4"><font style="font-size: 9pt" face="Arial" color="#000000">
					<input type="checkbox" name="tanker_cap4" id="tanker_cap4" value="4kl" onClick="showMe(this,'4kl')">
					4 KL</font></td></tr>
					<tr><td><div id="4kl" class="hideme">
					<table border="0" width="800" id="table5" cellpadding="0" bgcolor="#FDF9EE">
					<tr>
					<td width="145" height="21" align="center" bgcolor="#F7E6B7">
					<font face="Verdana" style="font-size: 8.5pt" color="#990000">Capacity(KL)</font></td>
					<td width="102" align="center" bgcolor="#F7E6B7">
					<font face="Verdana" style="font-size: 8.5pt" color="#990000">No. of trips / day</font></td>
					<td width="104" align="center" bgcolor="#F7E6B7">
					<font face="Verdana" style="font-size: 8.5pt" color="#990000">Supply(KLD)</font></td>
					<td width="237" align="center" bgcolor="#F7E6B7">
					<font style="font-size: 8.5pt" face="Verdana" color="#990000">
					Type of source</font></td>
					<td width="101" align="center" bgcolor="#F7E6B7">
					<font style="font-size: 8.5pt" face="Verdana" color="#990000">					
					Distance(Km)</font></td>
					<td width="97" align="center" bgcolor="#F7E6B7">
					<font style="font-size: 8.5pt" face="Verdana" color="#990000">					
					Cost(Rs./day)</font></td>
				</tr>
				<tr>
				  <td width="145" align="center"><input type="text" name="kl4_cap" id="kl4_cap" size="18" class="txt5" value="" readonly/></td>
				  <td width="102" align="center"><input type="text" name="kl4_trips" id="kl4_trips" onChange="multank4()" size="20" class="txt5"></td>
				  <td width="104" align="center"><input type="text" name="kl4_supply" id="kl4_supply" readonly size="20" class="txt5"></td>
					<td width="237" align="center">
				  <font style="font-size: 9pt" face="Arial" color="#000000">
					<input type="checkbox" name="kl4_sources[]" id="kl4_sources[]" value="tw">TW&nbsp;
				  <input type="checkbox" name="kl4_sources[]" id="kl4_sources[]" value="ow">OW&nbsp;
				  <input type="checkbox" name="kl4_sources[]" id="kl4_sources[]" value="Other" onClick="CritEnab4Source(this.checked)">Other&nbsp;</font>
				  <input type="text" name="kl4_source_other" id="kl4_source_other" class="txt5"></td>
					<td width="101" align="center">
				  <input type="text" name="kl4_tanker_distance" id="kl4_tanker_distance" size="20" class="txt5" onBlur="float2dec(this)"></td>
					<td width="97" align="center">
				  <input type="text" name="kl4_tanker_cost" id="kl4_tanker_cost" size="20" class="txt5" onBlur="numeric(this)"></td>
				</tr>
			</table></div></td></tr>
					<tr><td width="288" colspan="4"><font style="font-size: 9pt" face="Arial" color="#000000">
					<input type="checkbox" name="tanker_cap5" id="tanker_cap5" value="5kl" onClick="showMe(this,'5kl')">
					5 KL</font></td></tr>
					<tr><td><div id="5kl" class="hideme">
					<table border="0" width="800" id="table5" cellpadding="0" bgcolor="#FDF9EE">
					<tr>
					<td width="145" height="21" align="center" bgcolor="#F7E6B7">
					<font face="Verdana" style="font-size: 8.5pt" color="#990000">Capacity(KL)</font></td>
					<td width="102" align="center" bgcolor="#F7E6B7">
					<font face="Verdana" style="font-size: 8.5pt" color="#990000">No. of trips / day</font></td>
					<td width="104" align="center" bgcolor="#F7E6B7">
					<font face="Verdana" style="font-size: 8.5pt" color="#990000">Supply(KLD)</font></td>
					<td width="237" align="center" bgcolor="#F7E6B7">
					<font style="font-size: 8.5pt" face="Verdana" color="#990000">
					Type of source</font></td>
					<td width="101" align="center" bgcolor="#F7E6B7">
					<font style="font-size: 8.5pt" face="Verdana" color="#990000">					
					Distance(Km)</font></td>
					<td width="97" align="center" bgcolor="#F7E6B7">
					<font style="font-size: 8.5pt" face="Verdana" color="#990000">					
					Cost(Rs./day)</font></td>
				</tr>
				<tr>
				  <td width="145" align="center"><input type="text" name="kl5_cap" id="kl5_cap" size="18" class="txt5" value="" readonly/></td>
		<td width="102" align="center">
			<input type="text" name="kl5_trips" id="kl5_trips" onChange="multank5()" size="20" class="txt5"></td>
		<td width="104" align="center">
			 <input type="text" name="kl5_supply" id="kl5_supply" readonly size="20" class="txt5"></td>
					<td width="237" align="center">
				  <font style="font-size: 9pt" face="Arial" color="#000000">
					<input type="checkbox" name="kl5_sources[]" id="kl5_sources[]" value="tw">TW&nbsp;
				  <input type="checkbox" name="kl5_sources[]" id="kl5_sources[]" value="ow">OW&nbsp;
				  <input type="checkbox" name="kl5_sources[]" id="kl5_sources[]" value="Other" onClick="CritEnab5Source(this.checked)">Other&nbsp;</font>
				  <input type="text" name="kl5_source_other" id="kl5_source_other" class="txt5"></td>
					<td width="101" align="center">
				  <input type="text" name="kl5_tanker_distance" id="kl5_tanker_distance" size="20" class="txt5" onBlur="float2dec(this)"></td>
					<td width="97" align="center">
				  <input type="text" name="kl5_tanker_cost" id="kl5_tanker_cost" size="20" class="txt5" onBlur="numeric(this)"></td>
				</tr>
			</table></div></td></tr>
					<tr><td width="288" colspan="4"><font style="font-size: 9pt" face="Arial" color="#000000">
<input type="checkbox" name="tanker_cap10" id="tanker_cap10" value="10kl" onClick="showMe(this,'10kl')">					
10 KL</font></td>
					</tr>
					<tr><td><div id="10kl" class="hideme">
					<table border="0" width="800" id="table5" cellpadding="0" bgcolor="#FDF9EE">
					<tr>
					<td width="145" height="21" align="center" bgcolor="#F7E6B7">
					<font face="Verdana" style="font-size: 8.5pt" color="#990000">Capacity(KL)</font></td>
					<td width="102" align="center" bgcolor="#F7E6B7">
					<font face="Verdana" style="font-size: 8.5pt" color="#990000">No. of trips / day</font></td>
					<td width="104" align="center" bgcolor="#F7E6B7">
					<font face="Verdana" style="font-size: 8.5pt" color="#990000">Supply(KLD)</font></td>
					<td width="237" align="center" bgcolor="#F7E6B7">
					<font style="font-size: 8.5pt" face="Verdana" color="#990000">
					Type of source</font></td>
					<td width="101" align="center" bgcolor="#F7E6B7">
					<font style="font-size: 8.5pt" face="Verdana" color="#990000">					
					Distance(Km)</font></td>
					<td width="97" align="center" bgcolor="#F7E6B7">
					<font style="font-size: 8.5pt" face="Verdana" color="#990000">					
					Cost(Rs./day)</font></td>
				</tr>
				<tr>
				  <td width="145" align="center"><input type="text" name="kl10_cap" id="kl10_cap" size="18" class="txt5" value="" readonly/></td>
		<td width="102" align="center">
			<input type="text" name="kl10_trips" id="kl10_trips" onChange="multank10()" size="20" class="txt5"></td>
		<td width="104" align="center">
			 <input type="text" name="kl10_supply" id="kl10_supply" readonly size="20" class="txt5"></td>
					<td width="237" align="center">
				  <font style="font-size: 9pt" face="Arial" color="#000000">
					<input type="checkbox" name="kl10_sources[]" id="kl10_sources[]" value="tw">TW&nbsp;
				  <input type="checkbox" name="kl10_sources[]" id="kl10_sources[]" value="ow">OW&nbsp;
				  <input type="checkbox" name="kl10_sources[]" id="kl10_sources[]" value="Other" onClick="CritEnab10Source(this.checked)">Other&nbsp;</font>
				  <input type="text" name="kl10_source_other" id="kl10_source_other" class="txt5"></td>
					<td width="101" align="center">
				  <input type="text" name="kl10_tanker_distance" id="kl10_tanker_distance" size="20" class="txt5" onBlur="float2dec(this)"></td>
					<td width="97" align="center">
				  <input type="text" name="kl10_tanker_cost" id="kl10_tanker_cost" size="20" class="txt5" onBlur="numeric(this)"></td>
				</tr>
			</table></div></td></tr>
					<tr><td width="440" colspan="4"><font style="font-size: 9pt" face="Arial" color="#000000">
					<input type="checkbox" name="tanker_cap_other" id="tanker_cap_other" value="other" onClick="showMe(this,'other_kl')">&nbsp;Other</font>
					<!--&nbsp;&nbsp;<input type="text" name="text_cap_other" id="text_cap_other" class="txt5">-->
					</td></tr>
					<tr><td><div id="other_kl" class="hideme">
					<table border="0" width="800" id="table5" cellpadding="0" bgcolor="#FDF9EE">
					<tr>
					<td width="145" height="21" align="center" bgcolor="#F7E6B7">
					<font face="Verdana" style="font-size: 8.5pt" color="#990000">Capacity(KL)</font></td>
					<td width="102" align="center" bgcolor="#F7E6B7">
					<font face="Verdana" style="font-size: 8.5pt" color="#990000">No. of trips / day</font></td>
					<td width="104" align="center" bgcolor="#F7E6B7">
					<font face="Verdana" style="font-size: 8.5pt" color="#990000">Supply(KLD)</font></td>
					<td width="237" align="center" bgcolor="#F7E6B7">
					<font style="font-size: 8.5pt" face="Verdana" color="#990000">
					Type of source</font></td>
					<td width="101" align="center" bgcolor="#F7E6B7">
					<font style="font-size: 8.5pt" face="Verdana" color="#990000">					
					Distance(Km)</font></td>
					<td width="97" align="center" bgcolor="#F7E6B7">
					<font style="font-size: 8.5pt" face="Verdana" color="#990000">					
					Cost(Rs./day)</font></td>
				</tr>
				<tr>
				  <td width="145" align="center"><input type="text" name="other_cap" id="other_cap" onChange="multankother()" size="18" class="txt5" value=""/></td>
				  <td width="102" align="center">
			<input type="text" name="other_trips" id="other_trips" onChange="multankother()" size="20" class="txt5"></td>
		<td width="104" align="center">
			 <input type="text" name="other_supply" id="other_supply" readonly size="20" class="txt5"></td>
					<td width="237" align="center">
				  <font style="font-size: 9pt" face="Arial" color="#000000">
					<input type="checkbox" name="other_sources[]" id="other_sources[]" value="tw">TW&nbsp;
				  <input type="checkbox" name="other_sources[]" id="other_sources[]" value="ow">OW&nbsp;
				  <input type="checkbox" name="other_sources[]" id="other_sources[]" value="Other" onClick="CritEnabOtherSource(this.checked)">Other&nbsp;</font>
				  <input type="text" name="text_source_other" id="text_source_other" class="txt5"></td>
					<td width="101" align="center">
				  <input type="text" name="other_tanker_distance" id="other_tanker_distance" size="20" class="txt5" onBlur="float2dec(this)"></td>
					<td width="97" align="center">
				  <input type="text" name="other_tanker_cost" id="other_tanker_cost" size="20" class="txt5" onBlur="numeric(this)"></td>
				</tr>
			</table>
					</div></td></tr>
				<tr>
					<td colspan="4"><font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp;</font></td>
				</tr>
			</table></td></tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
		<td colspan="2">
			<p align="center">
			<input type="submit" value="Click for Continue" name="submit" style="font-size: 8pt; font-family: Verdana; border-style: solid; border-width: 3px; border-color:#F7E6B7" onClick="mult2()">&nbsp;</p></td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
</table>
</form>		
</div>
</body>
</html>